

import sys
import os
# 修正为向上3级到项目根目录
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from LLM.openaillm import OpenAIChat
from LLM.awsllm import AwsLLM

# 检查所有LLM提供商的连接状态
llm_services = [AwsLLM(), OpenAIChat()]

for service in llm_services:
    status = service.check_connection()
    print(f"[{status['provider']}] {status['status']} ({status.get('latency_ms', 0)}ms) | 详情: {status['detail']}")


# 原错误路径计算（向上4级）
# sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))

